//Copyright 2010 Balazs Keri, Imre Keri
//
//This file is part of FireworksCreator.
//
//FireworksCreator is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//FireworksCreator is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with FireworksCreator.  If not, see <http://www.gnu.org/licenses/>.
//
#ifndef _PLAYER_EMITTEREVALUATOR_H
#define _PLAYER_EMITTEREVALUATOR_H
//
#include <global.h>
#include "emitter_fwd.h"
#include "particle_fwd.h"
//
namespace player
{
class EmitterEvaluator
{
//construction
public:
   EmitterEvaluator();
   EmitterEvaluator(const Emitter *p_emitter,double p_t_start);
   EmitterEvaluator(const Emitter *p_emitter,double p_t_start,double p_t_end,double p_dt_min,double p_dt_max);
   EmitterEvaluator(const EmitterEvaluator &p_other);
   EmitterEvaluator& operator=(const EmitterEvaluator &p_other);
//operation
public:
   void start();
   void update(const Particle *p_particle);
private:
   double get_dt()const;
//data
private:
   const Emitter *emitter;
   double t_start;
   double t_end;
   double dt_min;
   double dt_max;
   double current_t_trigger;
};
}
//
#endif
